﻿<%@ page title="" language="C#" masterpagefile="~/MasterPages/MasterPagePrivate.master" autoeventwireup="true" inherits="Pages_Private_EventList, BtcHousing" stylesheettheme="ServerControls" %>
<%@ Register Src="~/UserControls/DataTableList.ascx" TagName="DataTableList" TagPrefix="UC" %>
<%@ Register Src="~/UserControls/Pager.ascx" TagName="Pager" TagPrefix="UC" %>

<asp:Content ID="Content1" ContentPlaceHolderID="PageHeader" Runat="Server">
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="PageBody" Runat="Server">
    <h4 id="h4Heading" runat="server">Events List</h4>
    <div id="divMessage" runat="server" visible="false" enableviewstate="false"></div>
    <div>
        <a href="/Pages/Private/EventChange.aspx">Create New Event</a>
    </div>
    <div class="ListingContainer">
        <asp:Repeater ID="rptEventList" runat="server">
            <HeaderTemplate>
                <table cellpadding="3" cellspacing="0" style="width:100%;">
                    <colgroup>
                        <col style="width:20%;" />
                        <col style="width:30%;"  />
                        <col style="width:20%;"  />
                        <col />
                        <col style="width:100px;" />
                    </colgroup>                
                    <tr>
                        <th>Title</th>
                        <th>Description</th>
                        <th>Image</th>
                        <th>Event Date</th>
                        <th style="text-align:center;">Actions</th>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>
                <tr class="OddRowListing">
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "Title")) %></td>
                    <td><%# GetFormattedData(DataBinder.Eval(Container.DataItem, "Description"))%></td>
                    <td>
                        <%# WebUtil.FormatImageField(AppConstants.EVENT_FILES, DataBinder.Eval(Container.DataItem, "ThumbImageFile"))%>                        
                    </td>
                    <td><%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "EventDate"))%></td>
                    <td style="text-align:center;">
                        <a href="/Pages/Private/EventChange.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>">Edit</a><br />
                        <a href="/Pages/Private/ViewBookings.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>">Vew Bookings</a><br />
                        <a href="javascript: ConfirmDelete('/Pages/Private/EventList.aspx?ID=<%# WebUtil.FormatData(DataBinder.Eval(Container.DataItem, "ID")) %>&Delete=True', 'Are you sure you want to delete this Event?'); void(0);">Delete</a>
                    </td>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <%--<UC:DataTableList id="ucEventList" runat="server"
            ExcludeVisibleFields="ID, TotalRecord" LinkFields="ID" CheckForDeletePermission="False"></UC:DataTableList>--%>
        <div style="margin-top:10px;">
            <UC:Pager ID="ucEventListPager" runat="server" OnPageIndexChanged="ucEventListPager_PageIndexChanged" />
        </div>
    </div>
</asp:Content>

